extends NodeState


@export var gun: Gun



func _on_process(delta : float) -> void:
	gun.process_auto_destroy(delta)



func _on_enter() -> void:
	# 设置了自动销毁，则落地时不允许捡起
	gun.set_deferred("monitorable", !gun.auto_destroy)
	gun.animationPlayer.play(Collectible.ANIMATION_GROUNDED)


func _on_exit() -> void:
	gun.set_deferred("monitorable", false)
